<?php
$pageTitle = '文章列表';
include 'header.tpl.php';
?>
<table>
  <tr>
    <td>
	<form action="" method="get">
	<label for="cid">栏目</label>
	<select name="cid">
		<option value="">全部</option>
		<?php foreach ($catalogList as $catalog):?>
		<option <?php if ($catalog['id']==$cid):?>selected="selected"<?php endif;?> value="<?php echo $catalog['id'];?>"><?php echo str_repeat('-', $catalog['level']-1) . $catalog['name'];?></option>
		<?php endforeach;?>
	</select>
	<label for="pageSize">每页</label>
		<input name="pageSize" value="<?php echo $pageSize;?>" style="width:20px" />
	<input type="submit" value="查看">
	</form>
	</td>
  </tr>
</table>

<table>
  <tr>
    <th>ID</th>
    <th>标题</th>
    <th>作者</th>
    <th>发布时间</th>
    <th>操作</th>
  </tr>
  <?php foreach ($archivesList as $archives):?>
  <tr>
    <td><?php echo $archives['id'];?></td>
    <td><a href="<?php echo $archives['url'];?>" target="_blank"><?php echo $archives['title'];?></a></td>
    <td><?php echo $archives['author'];?></td>
    <td><?php echo date('Y-m-d', $archives['pubdate']);?></td>
    <td><a href="<?php echo $short_router;?>edit?aid=<?php echo $archives['id'];?>">修改</a>,<a href="<?php echo $short_router;?>edit?aid=<?php echo $archives['id'];?>">删除</a></td>
  </tr>
  <?php endforeach;?>
</table>
<div class="pageNav">
<?php echo $pageNav;?>
</div>


<?php
include 'footer.tpl.php';
?>